package org.jeecg.modules.engineering.mapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.engineering.entity.EquipDataCollectorType;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description: 供应商设备类型对应表
 * @Author: jeecg-boot
 * @Date:   2019-10-14
 * @Version: V1.0
 */
@Repository
public interface EquipDataCollectorTypeMapper extends BaseMapper<EquipDataCollectorType> {

    @Select("SELECT * FROM equip_data_collector_type WHERE del_flag = 0 and sort_id = #{sortId} and collector_code = #{code}")
    EquipDataCollectorType getTypeByCollector(@Param("sortId") String sortId, @Param("code") String code);

    @Select("SELECT * FROM equip_data_collector_type WHERE del_flag = 0")
    List<EquipDataCollectorType> selectListAll();

    long getCount(@Param("sortId")String sortId, @Param("collectorId")String collectorId, @Param("id")String id);

    List<EquipDataCollectorType> selectSqlList(Page<EquipDataCollectorType> page, @Param("collectorId")String collectorId, @Param("sortId")String sortId, @Param("collectId")String collectId);
}
